home *** CD-ROM | disk | FTP | other *** search
- on wait ticks
- set startDelay to the timer
- repeat while the timer < (startDelay + ticks)
- end repeat
- end
-
- on initPush start, stop, TRUEorFALSE
- global gpushCurs
- repeat with n = start to stop
- puppetSprite(n, TRUEorFALSE)
- set the cursor of sprite n to gpushCurs
- end repeat
- end
-
- on init start, stop, TRUEorFALSE
- repeat with n = start to stop
- puppetSprite(n, TRUEorFALSE)
- end repeat
- end
-
- on button handlerName
- set whichsprite to the clickOn
- set actNow to 0
- set castUp to the castNum of sprite whichsprite
- set castDown to castUp + 1
- set clicker to 1
- repeat while the stillDown
- if rollOver(whichsprite) then
- if clicker = 1 then
- puppetSound("Bink", 1)
- set clicker to 0
- else
- nothing()
- end if
- set the castNum of sprite whichsprite to castDown
- updateStage()
- set actNow to 1
- next repeat
- end if
- set the castNum of sprite whichsprite to castUp
- updateStage()
- set actNow to 0
- if clicker = 0 then
- set clicker to 1
- end if
- end repeat
- if the castNum of sprite whichsprite = castDown then
- set the castNum of sprite whichsprite to castUp
- updateStage()
- end if
- if actNow = 1 then
- do(handlerName)
- end if
- end
-
- on QuitNow
- init(1, 40, 0)
- if the text of field "PersonalMenu" = "EMPTY" then
- go("quit")
- else
- go("quitNsave")
- end if
- end
-
- on PrintField
- if the machineType = 256 then
- set myPrinter to Print_X(mnew)
- myPrinter(mSetHeaderTop1, 40)
- set header1 to "The Laughing Bird Restaurant"
- myPrinter(mSetHeaderTop2, 700)
- set header2 to "Page 1"
- myPrinter(mSetJustify1, 0)
- myPrinter(mSetJustify2, 0)
- myPrinter(mSetHeaderStyle1, "Times New Roman", 18, 1)
- myPrinter(mSetHeaderStyle2, "Times New Roman", 12, 1)
- myPrinter(mSetBodyTop, 80)
- set ErrMessage to myPrinter(mPrintPage, header1, header2, the text of field "Printfield", EMPTY, 0)
- if objectp(myPrinter) then
- myPrinter(mdispose)
- end if
- if string(ErrMessage) <> EMPTY then
- put string(ErrMessage)
- end if
- else
- set aName to CallBackTracer(mnew)
- setCallBack(#PrintDoc, aName)
- set PageHeader to "The Laughing Bird Restaurant"
- set container to the text of cast "Printfield"
- set PrintDialogString to "Laughing Bird Recipes"
- set FontName to "hobo"
- set FontSize to "12"
- set BooleanSetUp to "true"
- PrintDoc(PageHeader, container, PrintDialogString, FontName, FontSize, BooleanSetUp)
- end if
- end
-
- on printInfoNow
- if the machineType = 256 then
- set myPrinter to Print_X(mnew)
- myPrinter(mSetHeaderTop1, 40)
- set header1 to "Laughing Bird Password Registration"
- myPrinter(mSetHeaderTop2, 700)
- set header2 to "Thank You."
- myPrinter(mSetJustify1, 0)
- myPrinter(mSetJustify2, 0)
- myPrinter(mSetHeaderStyle1, "Times New Roman", 18, 1)
- myPrinter(mSetHeaderStyle2, "Times New Roman", 12, 1)
- myPrinter(mSetBodyTop, 80)
- set ErrMessage to myPrinter(mPrintPage, header1, header2, the text of field "Fullinfo2", EMPTY, 0)
- if objectp(myPrinter) then
- myPrinter(mdispose)
- end if
- if string(ErrMessage) <> EMPTY then
- put string(ErrMessage)
- end if
- else
- set aName to CallBackTracer(mnew)
- setCallBack(#PrintDoc, aName)
- set PageHeader to "Laughing Bird Password Registration"
- set container to the text of cast "Fullinfo2"
- set PrintDialogString to "Laughing Bird Recipes"
- set FontName to "geneva"
- set FontSize to "12"
- set BooleanSetUp to "true"
- PrintDoc(PageHeader, container, PrintDialogString, FontName, FontSize, BooleanSetUp)
- end if
- end
-
- on findAndReplaceAll sourceText, findText, replaceText
- set findLength to length(findText) - 1
- set startSearchAt to 1
- repeat while sourceText contains findText
- repeat with charNum = startSearchAt to length(sourceText) - findLength
- set testChunk to char charNum to charNum + findLength of sourceText
- if testChunk = findText then
- if charNum = 1 then
- set beforeChunk to EMPTY
- else
- set beforeChunk to char 1 to charNum - 1 of sourceText
- end if
- set afterChunk to char findLength + charNum + 1 to length(sourceText) of sourceText
- set sourceText to beforeChunk & replaceText & afterChunk
- set startSearchAt to charNum
- exit repeat
- end if
- end repeat
- end repeat
- return sourceText
- updateStage()
- end
-
- factory CallBackTracer
- method mnew
-
- method mSendHCMessage x
-
- method mSendCardMessage x
-